home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Best of Shareware
/
Best of PC Windows Shareware 1.0 - Wayzata Technology (7111) (1993).iso
/
mac
/
DOS
/
UTILITY
/
SPARKL31
/
MENU.BAT
< prev
next >
Wrap
DOS Batch File
|
1992-08-12
|
2KB
|
56 lines
echo off
cls
echo Here's an example of how to create a menu using Sparkle.
rem
rem ---- First display a window (option #6):
rem Display some color; then pop up a window with a shadow (thus the "-2").
rem
sparkle 6 4 1 20 80 32 32 /
sparkle 6 5 10 18 71 79 -2 /... Main Menu ...
rem
rem ---- 2nd, print the 4 menu options (plus Quit)
rem
sparkle 5 8 31 112 /── This is option 1 ──
sparkle 5 10 31 112 /── This is option 2 ──
sparkle 5 12 31 112 /── This is option 3 ──
sparkle 5 14 31 112 /── This is option 4 ──
sparkle 5 16 31 112 /── Quit ──
rem
rem ---- Now we tell Sparkle to turn this into a VERTICAL Bar menu (direction = 1)
rem Option # = 2. Screen coordinates 7, 30 (top left) to 16, 53 (bottom right).
rem Highlight options using color 15 (bright white on black)
sparkle 2 7 30 16 53 15 1
rem
rem ---- add your own lines here to test Errorlevel
rem
If Errorlevel 88 Goto Error
If Errorlevel 27 Goto EscPressed
If Errorlevel 5 Goto 5thOption
If Errorlevel 4 Goto 4thOption
If Errorlevel 3 Goto 3rdOption
If Errorlevel 2 Goto 2ndOption
If Errorlevel 1 Goto 1stOption
Goto End
:Error
echo An error must have occurred. Possibly someone changed this and I can't find
echo or process the menu. Sorry. Check the batch file.
goto end
:EscPressed
echo You pressed Escape.
goto end
:1stOption
echo You selected the 1st option
goto end
:2ndOption
echo You selected the 2nd option
goto end
:3rdOption
echo You selected the 3rd option
goto end
:4thOption
echo You selected the 4th option
goto end
:5thOption
echo You selected the 5th option -- Quit
:End